The present invention relates to an echo canceler for canceling echo in a full-duplex communication device, more particularly to an echo canceler that outputs a transmit signal with automatic gain control.
Many telephone sets, including both cordless telephone sets and those with cords, have a hands-free function or speakerphone function that enables the user to hold a telephone conversation without picking up a handset. In a cordless telephone, this function can be implemented by increasing the volume of the loudspeaker and the sensitivity of the microphone, so that the handset does not have to be held next to the user's head.
A problem in hands-free conversations is that the far-end party's voice signal, when reproduced through the loudspeaker, is picked up by the microphone and becomes an echo signal. If the microphone is close to the loudspeaker, the echo may be strong enough to establish a positive feedback loop, causing the unpleasant phenomenon known as howling. Telephone sets with a hands-free or speakerphone function therefore also include an echo canceler to attenuate the echo signal. An echo canceler uses the incoming far-end signal to estimate the echo signal that will be produced, and subtracts the estimated echo signal from the signal received from the microphone, thereby eliminating or at least reducing the echo.
The loudspeaker of a telephone handset normally produces a signal that can be heard comfortably when the handset is held next to the user's ear. When a cordless telephone is used in a hands-free mode, the volume of the voice signal received at the microphone is highly variable, so to avoid discomfort to the far-end party, it may be necessary to attenuate the voice signal when it is too strong, as well as amplifying the voice signal when it is too weak. Recent cordless telephone sets and similar devices therefore have circuits that automatically adjust the microphone input signal to an appropriate level, in addition to an echo canceler that cancels the unwanted echo component.
FIG. 9 illustrates a telephone set having an echo canceler 1 and a separate automatic level adjuster 2. The signal RXi received from the far end is sampled in the echo canceler 1, supplied as a receive output signal RXo to a loudspeaker 3, and reproduced as sound. Part of the reproduced sound returns as an echo E to the microphone 4 that picks up the near-end voice signal V. The transmit input signal TXi from the microphone 3 is amplified or attenuated with automatic gain control in the automatic level adjuster 2, and the resulting transmit signal TXm is supplied to the echo canceler 1. The echo canceler 1 estimates and cancels the echo component, generating a transmit output signal TXo which is sent to the far end.
The echo canceler 1 includes an echo cancellation signal generator 11 that receives RXi and TXm and generates an echo cancellation signal EC, and a subtractor 13 that subtracts EC from TXm to cancel the echo. The subtractor 13 is shown as an adder with an inverting (−) input terminal; that is, the echo cancellation signal EC is inverted so that it is opposite in polarity to the estimated echo, and is then added to the amplified or attenuated transmit signal TXm to cancel the echo component therein. The echo cancellation signal generator 11 generates the echo cancellation signal EC by use of a technique known as predictive filtering, which estimates the strength of the echo as a function of the echo delay. The echo cancellation signal generator 11 also updates the predictive filtering coefficients to adjust to changes in the acoustic characteristics of the echo path.
The echo cancellation signal generator 11 monitors the level of the amplified or attenuated transmit signal TXm, and updates the predictive filtering coefficients only when this level is low, normally because the near-end party is not speaking. If the characteristics of the echo path do not change and the gain employed in the automatic level adjuster 2 remains constant, the updating algorithm forces the coefficients to converge to values that predict the echo accurately, so that the echo signal is canceled substantially completely. When the echo path characteristics and/or the gain of the automatic level adjuster 2 change, however, echo cancellation becomes incomplete until the echo cancellation signal generator 11 can adjust to the new conditions.
The automatic level adjuster 2 includes a signal level data generator 21 that detects the level of the transmit input signal TXi and generates signal level data LD indicating the difference between the detected signal level and an arbitrary reference level. The signal level data generator 21 also includes an automatic gain control (AGC) unit 22 that amplifies or attenuates the transmit input signal TXi with a gain responsive to the signal level data LD, thereby holding the level of the amplified (or attenuated) transmit signal TXm substantially equal to the reference level. The gain is adjusted when the transmit input signal TXi has at least a certain minimum level, regardless of the presence or absence of echo; the gain is left unchanged when the TXi level is below this minimum level.
A problem arising in FIG. 9 is that the varying gain employed in the automatic level adjuster 2 interferes with the accurate operation of the echo canceler 1. Each time the gain in the automatic level adjuster 2 is changed, the echo canceler 1 must adjust its predictive filtering coefficients to the new gain, and a residual echo remains until the coefficients have converged to appropriate new values. This problem arises because the echo canceler 1 and automatic level adjuster 2 operate independently. Further information will be given in the detailed description of the invention.
One conceivable solution to this problem would be to place the automatic level adjuster 2 after the echo canceler 1 on the transmit signal path, thus deferring automatic gain control until the echo had already been canceled. This solution can fail, however, when the automatic level adjuster 2 operates with a comparatively high gain. At such times, after the echo canceler 1 has reduced the echo component to a negligible level, the automatic level adjuster 2 amplifies the echo component again, so the far-end party may hear an audible residual echo.